<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var vegetable = prompt('请输入查询的蔬菜：')
        switch (vegetable) {
            case '芹菜':
                console.log('芹菜的价格是3.2元/kg');
                break
            case '黄瓜':
                console.log('黄瓜的价格是2.5元/kg');
                break
            case '莲藕':
                console.log('莲藕的价格是9.0元/kg');
                break
            case '土豆':
                console.log('土豆的价格是1.2元/kg');
                break
            default:
                console.log('没有此蔬菜')
        }
    </script>
</body>
</html>